import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    userInfo: {}, // 用户信息
    versionInfo: {}, // APP版本信息
    scrollY: 0
  },
  mutations: {
    setUserInfo(state, info) {
      state.userInfo = info;
    },
    setVersionInfo(state, data) {
      state.versionInfo = data;
    },
    setScrollY (state, num) {
      state.scrollY = num;
    }
  },
  actions: {},
  modules: {},
});
